﻿using System;

namespace dPet.Domain.Models
{
	using Hangerd.Entity;

	public class InventoryLORecord : EntityBase
	{
		#region Public Properties

		/// <summary>
		/// 所属医院ID
		/// </summary>
		public string HospitalId { get; private set; }

		/// <summary>
		/// 商品ID
		/// </summary>
		public string ProductId { get; private set; }

		/// <summary>
		/// 商品条码
		/// </summary>
		public string ProductBarcode { get; private set; }

		/// <summary>
		/// 商品名称
		/// </summary>
		public string ProductName { get; private set; }

		/// <summary>
		/// 库存编号
		/// </summary>
		public string InventoryNumber { get; private set; }

		/// <summary>
		/// 损溢类型
		/// </summary>
		public InventoryLOType LOType { get; private set; }

		/// <summary>
		/// 数量
		/// </summary>
		public int Quantity { get; private set; }

		/// <summary>
		/// 操作人
		/// </summary>
		public string Operator { get; private set; }

		#endregion

		#region Constructors

		private InventoryLORecord() { }

		public InventoryLORecord(ProductInventory productInventory, InventoryLOType loType, int quantity, string @operator)
		{
			this.HospitalId = productInventory.Product.HospitalId;
			this.ProductId = productInventory.Product.Id;
			this.ProductBarcode = productInventory.Product.Barcode;
			this.ProductName = productInventory.Product.Name;
			this.InventoryNumber = productInventory.InventoryNumber;
			this.LOType = loType;
			this.Quantity = quantity;
			this.Operator = @operator;
		}

		#endregion

		#region Public Methods

		#endregion
	}
}
